<?php $this->_extends('_layouts/blank_layout'); ?>

<?php $this->_block('title'); ?> - 查看主机组<?php $this->_endblock(); ?>

<?php $this->_block('contents'); ?>

	<div id="getting-started" alt="查看主机组">
	    <?php if ($adming!=0): ?>
		<?php //echo $adming;?>
		<table>
			<tr><th width="5">　</th><th width="80" align="center">主机组名</th><th>描述</th><th width="80" align="center">创建时间</th><th width="130" class="imgbox"><img src="images/icons/users.png"/></th><th width="18" class="imgbox"><img src="images/icons/acts.png"/></th><th width="18" class="imgbox"><img src="images/icons/counts.png"/></th><th width="80" align="center">操作</th></tr>
			<?php foreach ($group as $s): ?>
			<tr class="<?php if(($countno+1)/2==ceil(($countno+1)/2)){echo 'tw';} ?>"><td align="center"><?php echo $countno++;?></td><td><a href="<?php echo url('default::default/framework', array('id' => $s->id(),'control' => 'hostmanage','acts' => 'hostlist|search','id' => $s->id())); ?>"><?php echo $s->groupname;?></a></td><td><?php echo $s->description;?></td><td><?php echo $s->datetime;?></td><td><?php if(isset($groupc[$s->id()]['adminus']) && $groupc[$s->id()]['adminus']!='')echo $groupc[$s->id()]['adminus'];else echo '-'; ?></td><td><?php if(isset($groupc[$s->id()]['lives']))echo $groupc[$s->id()]['lives'];else echo '0';  ?></td><td><?php if(isset($groupc[$s->id()]['hosts']))echo $groupc[$s->id()]['hosts'];else echo '0';  ?></td><td>
			 <a href="<?php echo url('default::default/framework', array('id' => $s->id(),'control' => 'hostmanage','acts' => 'admins|edit','id' => $s->id())); ?>"><img src="images/icons/edit.png"></a>
				<a href="<?php echo url('default::default/framework', array('id' => $s->id(),'control' => 'hostmanage','acts' => 'admins|del','id' => $s->id())); ?>" onclick="if(!confirm('<?php if(isset($group_config[$s->id])){echo '该组还存在组规则，';}?>确认删除吗？')){return false;}"><img src="images/icons/del.png"></a>
				<a href="<?php echo url('default::default/framework', array('id' => $s->id(),'control' => 'hostmanage','acts' => 'state|search','groupid' => $s->id())); ?>"><img src="images/icons/hosts.png" title="查看主机状态"></a>
				<a href="<?php echo url('default::default/framework', array('id' => $s->id().'|'.$s->groupname,'control' => 'hostmanage','acts' => 'views|search','groupid' => $s->id())); ?>"><img src="images/icons/users.png" title="删除管理员"/></a>
				</td></tr>
			<?php endforeach; ?>
			<tr class="tw">
				<td colspan="8">
					<center>共有 <font color="Red"><?php echo $pager['record_count'];?></font> 条记录,分为 <font color="Red"><?php echo $pager['page_count'];?></font> 页显示,当前第 <font color="Red"><?php echo $pager['current'];?></font>页,每页 <font color="Red"><?php echo $pager['page_size'];?></font> 条<?php echo $pagestr; ?></center>
				</td>
			</tr>
		</table>

		<?php else: ?>
<center><h2>暂无可管理主机组。</h2></center>
<?php endif; ?>
	</div>

<?php $this->_endblock('contents'); ?>